Add BinaryReaderExtensions ported from Ressy#13
Merged
Conversation
…s, ReadNullTerminatedString Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/5bda059e-c395-49c1-8872-69ad89f263c3 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Tyrrrz
April 12, 2026 17:01
View session
Tyrrrz
approved these changes
Apr 12, 2026
Owner
|
@copilot please resolve conflicts |
…eader-extensions-again # Conflicts: # PowerKit.Tests/BinaryReaderExtensionsTests.cs # PowerKit/Extensions/BinaryReaderExtensions.cs Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Tyrrrz
reviewed
Apr 12, 2026
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/1a51fd53-a9a7-46d9-9d0b-24fa49840985 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ports BinaryReaderExtensions functionality from Ressy into PowerKit, adding end-of-stream/padding helpers and aligning test coverage for the new/merged behaviors.
Changes:
- Added
IsEndOfStreamandSkipPaddingtoBinaryReaderextensions. - Added/updated unit tests for
IsEndOfStreamandSkipPadding, and adjusted an empty-string assertion style. - Kept/adopted behavior for
SkipZeroesandReadNullTerminatedStringper PR description.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| PowerKit/Extensions/BinaryReaderExtensions.cs | Introduces IsEndOfStream and SkipPadding on BinaryReader. |
| PowerKit.Tests/BinaryReaderExtensionsTests.cs | Adds tests for IsEndOfStream/SkipPadding and refines an assertion for empty string. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/a047cadd-639b-40d7-b494-0874f7cc912c Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Contributor
Author
Tyrrrz
approved these changes
Apr 12, 2026
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PowerKit/Extensions/BinaryReaderExtensions.cs: keep ourIsEndOfStream+SkipPadding, adopt prime'sSkipZeroes(usesPeekChar()), keep prime's doc forReadNullTerminatedStringPowerKit.Tests/BinaryReaderExtensionsTests.cs: keep ourIsEndOfStream+SkipPaddingtests, adopt prime'sSkipZeroestests (more comprehensive)